package pdfsetter.core.pages;

/**
 * PageRectangle represents rectangular place on page in which some other page will be inserted. Horizontal and vertical shifts refer to the 'top left' point of
 * rectangle. From this point we measure width (x-axis, rightward) and height (y-axis, downward). The rectangle can also be rotated - the 'top left' point is
 * the center of rotation, and we rotate downward (clockwise). All values (except rotation which is in radians) are in millimeters.
 * 
 * @author Andrzej Dorobisz
 */

public class PageRectangle {
    private final double horizontalShift;
    private final double verticalShift;
    private final double width;
    private final double height;
    private final double rotation;

    /**
     * 
     * @param horizontalShift
     * @param verticalShift
     * @param width
     * @param height
     * @param rotation
     *            in radians
     */
    public PageRectangle(double horizontalShift, double verticalShift, double width, double height, double rotation) {
        this.horizontalShift = horizontalShift;
        this.verticalShift = verticalShift;
        this.width = width;
        this.height = height;
        this.rotation = rotation;
    }

    public double getHorizontalShift() {
        return horizontalShift;
    }

    public double getVerticalShift() {
        return verticalShift;
    }

    public double getWidth() {
        return width;
    }

    public double getHeight() {
        return height;
    }

    /**
     * @return rotation in radians
     */
    public double getRotation() {
        return rotation;
    }
}
